package com.hczt.fire.entity.demo;


import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author marvin.ma
 * @create 2017-09-12 22:04
 * @desc 用户实体
 **/
@Entity
@Table(name = "demo_user")
public class DemoUser implements Serializable {

    private static final long serialVersionUID = -5742985867296422955L;

    private Long id;
    private String name;
    private String sex;
    private int age;
    private Date addTime;
    private String address;
    private String remark;
    private int deleteFlag;
    private DemoUserType userType;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "sex")
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(int deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    @JoinColumn(name = "type")
    @ManyToOne
    public DemoUserType getUserType() {
        return userType;
    }

    public void setUserType(DemoUserType userType) {
        this.userType = userType;
    }
}
